let routes = require('./routes');
let userDao = require('../dao/userDao');
let playerDao = require('../dao/playerDao');
let sessionMgr = require('../core/sessionMgr');
let utils = require('../core/utils');
let Player = require('../module/player');
let mainHandle = require('../core/mainHandle');

let totalConfig = mainHandle.totalConfig;
let propName = mainHandle.propName;


routes.setNotLogin('getErrMap', (msg, cb) => {
    cb(0, routes.errMap)
}, {
    101: '数据库错误',
    102: '参数错误',
    103: '请求不存在',
    104: '请求不是post',
    105: '用户未登陆',
    106: '角色未登陆',
    107: '背包空间不足'
});

routes.setNotLogin('getPropName', (msg, cb) => {
    cb(0, propName);
});

routes.setNotLogin('getTotalConfig', (msg, cb) => {
    cb(0, totalConfig);
});